/*
*  Copyright 2019-2023 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.phone.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* @description /
* @author nobody
* @date 2025-01-08
**/
@Data
@TableName("sms_phone")
public class SmsPhone implements Serializable {

    @TableId(value = "sms_phone_id", type = IdType.AUTO)
    @ApiModelProperty(value = "用户手机id")
    private Integer smsPhoneId;

    @NotBlank
    @ApiModelProperty(value = "用户token")
    private String smsUserToken;

    @NotBlank
    @ApiModelProperty(value = "手机token")
    private String smsPhoneToken;

    @NotBlank
    @ApiModelProperty(value = "平台token")
    private String smsPlatformToken;

    @NotBlank
    @ApiModelProperty(value = "手机号")
    private String smsPhoneNumber;

    @NotBlank
    @ApiModelProperty(value = "手机号平台key")
    private String smsPhoneKey;

    @NotNull
    @ApiModelProperty(value = "手机号提取时间")
    private Timestamp smsPhoneCreateTime;

    @NotBlank
    @ApiModelProperty(value = "归属国家代码")
    private String smsPhoneCountryCode;

    @NotBlank
    @ApiModelProperty(value = "归属区域代码")
    private String smsPhoneAreaCode;

    @NotBlank
    @ApiModelProperty(value = "归属地")
    private String smsPhonePosition;

    @NotBlank
    @ApiModelProperty(value = "端口号")
    private String smsPhonePort;

    @NotBlank
    @ApiModelProperty(value = "对接码")
    private String smsPhoneAcceptCode;

    @NotBlank
    @ApiModelProperty(value = "状态码")
    private String smsPhoneStatus;

    @NotBlank
    @ApiModelProperty(value = "原始值")
    private String smsOriginal;

    @ApiModelProperty(value = "更新时间")
    private Timestamp smsPhoneUpdateTime;

    public void copy(SmsPhone source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
